home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 010a / fff361.zip / ARJ.H < prev    next >
C/C++ Source or Header  |  1991-06-12  |  1KB  |  53 lines

  1. typedef unsigned char  uchar;   /*  8 bits or more */
  2. typedef unsigned int   uint;    /* 16 - 32 bits or more */
  3. typedef unsigned short ushort;  /* 16 bits or more */
  4. typedef unsigned long  ulong;   /* 32 bits or more */
  5.  
  6. #ifndef DOS_DATE
  7. #define DOS_DATE
  8. typedef union {
  9.     unsigned u;
  10.     struct {
  11.         unsigned Day   : 5;
  12.         unsigned Month : 4;
  13.         unsigned Year  : 7;
  14.         } b;
  15.     } DOS_FILE_DATE;
  16. #endif
  17.  
  18. #ifndef DOS_TIME
  19. #define DOS_TIME
  20. typedef union {
  21.     unsigned u;
  22.     struct {
  23.         unsigned Second : 5;
  24.         unsigned Minute : 6;
  25.         unsigned Hour   : 5;
  26.         } b;
  27.     } DOS_FILE_TIME;
  28. #endif
  29.  
  30. typedef struct {
  31.     unsigned char FirstHeaderSize;
  32.     unsigned ArchivVersion;
  33.     unsigned char HostOS;
  34.     unsigned char ARJFlags;
  35.     unsigned char Method;
  36.     unsigned Reserved;
  37.     DOS_FILE_TIME Time;
  38.     DOS_FILE_DATE Date;
  39.     unsigned long CompressedSize;
  40.     unsigned long OriginalSize;
  41.     unsigned long CRC;
  42.     unsigned EntryNamePosition;
  43.     unsigned FileMode;
  44.     unsigned HostData;
  45.     } ARJ_HEADER;
  46.  
  47. #define FNAME_MAX         512
  48. #define FIRST_HDR_SIZE    sizeof(ARJ_HEADER)-4
  49. #define COMMENT_MAX       2048
  50. #define HEADERSIZE_MAX    (FIRST_HDR_SIZE + 10 + FNAME_MAX + COMMENT_MAX)
  51.  
  52. void DoArj (char *Path);
  53.